package com.oracle.jimu.action;

import java.util.List;

import com.opensymphony.xwork2.ActionSupport;
import com.oracle.jimu.bean.ProductBean;
import com.oracle.jimu.bean.SuperType;
import com.oracle.jimu.service.ProductService;
import com.oracle.jimu.service.SuperTypeService;

public class TopAction extends ActionSupport {
	private SuperTypeService superService;
	private ProductService prodService;
	private List<SuperType> superList;
	private List<ProductBean> prodList;
	private List<ProductBean> hostList;
	
	
	
	public List<ProductBean> getHostList() {
		return hostList;
	}


	public void setHostList(List<ProductBean> hostList) {
		this.hostList = hostList;
	}


	public ProductService getProdService() {
		return prodService;
	}


	public void setProdService(ProductService prodService) {
		this.prodService = prodService;
	}


	public List<ProductBean> getProdList() {
		return prodList;
	}


	public void setProdList(List<ProductBean> prodList) {
		this.prodList = prodList;
	}


	public SuperTypeService getSuperService() {
		return superService;
	}


	public void setSuperService(SuperTypeService superService) {
		this.superService = superService;
	}


	public List<SuperType> getSuperList() {
		return superList;
	}


	public void setSuperList(List<SuperType> superList) {
		this.superList = superList;
	}

	public String top(){
		
		superList=superService.getSupers();
		prodList=prodService.prodList();
		hostList=prodService.getAds();
		System.out.println("superList.size()="+superList.size());
		System.out.println("prodList.size()="+prodList.size());
		System.out.println("hostList.size()="+hostList.size());
		return SUCCESS;
	}
	
	@Override
	public String execute() throws Exception {
		// TODO Auto-generated method stub
		superList=superService.getSupers();	
		return SUCCESS;
	}

}
